<html>

<head>
<meta name=标题 content="">
<meta name=关键词 content="">
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta name=Generator content="Microsoft Word 15 (filtered)">
<style>
<!--
 /* Font Definitions */
@font-face
	{font-family:"Courier New";
	panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
	{font-family:Times;
	panose-1:0 0 5 0 0 0 0 2 0 0;}
@font-face
	{font-family:Wingdings;
	panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
	{font-family:"Cambria Math";
	panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
	{font-family:DengXian;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
	{font-family:"\@DengXian";}
@font-face
	{font-family:"Microsoft YaHei";
	panose-1:2 11 5 3 2 2 4 2 2 4;}
@font-face
	{font-family:Menlo;
	panose-1:2 11 6 9 3 8 4 2 2 4;}
@font-face
	{font-family:"\@Microsoft YaHei";}
 /* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:12.0pt;
	font-family:DengXian;}
code
	{font-family:Courier;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
	{margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:21.0pt;
	font-size:12.0pt;
	font-family:DengXian;}
p.a, li.a, div.a
	{margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	line-height:200%;
	font-size:12.0pt;
	font-family:"Microsoft YaHei";}
.MsoChpDefault
	{font-family:DengXian;}
 /* Page Definitions */
@page WordSection1
	{size:595.0pt 842.0pt;
	margin:72.0pt 90.0pt 72.0pt 90.0pt;
	layout-grid:15.6pt;}
div.WordSection1
	{page:WordSection1;}
 /* List Definitions */
ol
	{margin-bottom:0cm;}
ul
	{margin-bottom:0cm;}
-->
</style>

</head>

<body lang=ZH-CN style='text-justify-trim:punctuation'>

<div class=WordSection1 style='layout-grid:15.6pt'>

<p class=MsoNormal style='line-height:200%'><b><span lang=EN-US
style='font-size:14.0pt;line-height:200%;font-family:"Microsoft YaHei"'>mkdir</span></b></p>

<p class=MsoNormal align=left style='margin-bottom:12.0pt;text-align:left;
line-height:200%;text-autospace:none'><b><span lang=EN-US style='font-family:
"Microsoft YaHei"'>     </span></b><span style='font-family:"Microsoft YaHei";
color:black;vertical-align:sub'>如果目录不存在，那么就创建目录。此命令的适用范围：<span lang=EN-US>RedHat</span>、<span
lang=EN-US>RHEL</span>、<span lang=EN-US>Ubuntu</span>、<span lang=EN-US>CentOS</span>、<span
lang=EN-US>SUSE</span>、<span lang=EN-US>openSUSE</span>、<span lang=EN-US>Fedora</span>。</span></p>

<p class=MsoNormal style='line-height:200%'><span lang=EN-US style='font-family:
"Microsoft YaHei"'>1</span><span style='font-family:"Microsoft YaHei"'>、语法</span></p>

<p class=MsoNormal style='line-height:200%'><span lang=EN-US style='font-family:
"Microsoft YaHei"'>     <b>mkdir  [</b></span><b><span style='font-family:"Microsoft YaHei"'>选项<span
lang=EN-US>]  dir</span></span></b></p>

<p class=MsoNormal style='line-height:200%'><span lang=EN-US style='font-family:
"Microsoft YaHei"'>2</span><span style='font-family:"Microsoft YaHei"'>、选项列表</span></p>

<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0 width="97%"
 style='width:97.0%;margin-left:24.1pt;border-collapse:collapse;border:none'>
 <tr>
  <td width="28%" valign=top style='width:28.58%;border:solid windowtext 1.0pt;
  background:#E7E6E6;padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span style='font-family:"Microsoft YaHei"'>选项</span></p>
  </td>
  <td width="71%" valign=top style='width:71.42%;border:solid windowtext 1.0pt;
  border-left:none;background:#E7E6E6;padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span style='font-family:"Microsoft YaHei"'>说明</span></p>
  </td>
 </tr>
 <tr>
  <td width="28%" valign=top style='width:28.58%;border:solid windowtext 1.0pt;
  border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span lang=EN-US
  style='font-family:"Microsoft YaHei"'>--version</span></p>
  </td>
  <td width="71%" valign=top style='width:71.42%;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span style='font-family:"Microsoft YaHei"'>显示命令版本信息</span></p>
  </td>
 </tr>
 <tr>
  <td width="28%" valign=top style='width:28.58%;border:solid windowtext 1.0pt;
  border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span lang=EN-US
  style='font-family:"Microsoft YaHei"'>--help</span></p>
  </td>
  <td width="71%" valign=top style='width:71.42%;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span style='font-family:"Microsoft YaHei"'>显示帮助文档</span></p>
  </td>
 </tr>
 <tr>
  <td width="28%" valign=top style='width:28.58%;border:solid windowtext 1.0pt;
  border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span lang=EN-US
  style='font-family:"Microsoft YaHei"'>-m | --mode=MODE</span></p>
  </td>
  <td width="71%" valign=top style='width:71.42%;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span style='font-family:"Microsoft YaHei"'>设置目录的权限</span></p>
  </td>
 </tr>
 <tr>
  <td width="28%" valign=top style='width:28.58%;border:solid windowtext 1.0pt;
  border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span lang=EN-US
  style='font-family:"Microsoft YaHei"'>-p | --parents</span></p>
  </td>
  <td width="71%" valign=top style='width:71.42%;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><b><span style='font-family:"Microsoft YaHei"'>创建多层目录的时候，如果父目录不存在，那么首先创建父目录</span></b></p>
  </td>
 </tr>
 <tr>
  <td width="28%" valign=top style='width:28.58%;border:solid windowtext 1.0pt;
  border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span lang=EN-US
  style='font-family:"Microsoft YaHei"'>-v | --vervose</span></p>
  </td>
  <td width="71%" valign=top style='width:71.42%;border-top:none;border-left:
  none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
  padding:0cm 5.4pt 0cm 5.4pt'>
  <p class=MsoNormal style='line-height:200%'><span style='font-family:"Microsoft YaHei"'>显示执行过程</span></p>
  </td>
 </tr>
</table>

<p class=MsoNormal style='line-height:200%'><span lang=EN-US style='font-family:
"Microsoft YaHei"'>3</span><span style='font-family:"Microsoft YaHei"'>、实例</span></p>

<p class=MsoNormal style='line-height:200%'><span lang=EN-US style='font-family:
"Microsoft YaHei"'>     1</span><span style='font-family:"Microsoft YaHei"'>）创建一个最大权限的目录
</span></p>

<table class=a0 border=1 cellspacing=0 cellpadding=0 width="97%"
 style='width:97.0%;margin-left:24.1pt;border-collapse:collapse;border:none'>
 <tr style='height:14.9pt'>
  <td width=836 valign=top style='width:836.15pt;border:solid windowtext 1.0pt;
  background:#E7E6E6;padding:0cm 5.4pt 0cm 5.4pt;height:14.9pt'>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>[root@localhost
  weijie]#<b> mkdir -m 777 test</b></span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>[root@localhost
  weijie]# <b>ls -l</b></span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span style='font-size:
  10.0pt;line-height:200%;font-family:DengXian'>总用量</span></code><code><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'> 360</span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>-rw-r--r-- 1 root
  root      0 9</span></code><code><span style='font-size:10.0pt;line-height:
  200%;font-family:DengXian'>月</span></code><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>   7 09:11 1.c</span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>-rw-r--r-- 1 root
  root 358400 9</span></code><code><span style='font-size:10.0pt;line-height:
  200%;font-family:DengXian'>月</span></code><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>   7 15:46 my.iso</span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><b><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>drwxrwxrwx 2 root
  root   4096 9</span></b></code><code><b><span style='font-size:10.0pt;
  line-height:200%;font-family:DengXian'>月</span></b></code><code><b><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'>  10
  11:33 test</span></b></code></p>
  </td>
 </tr>
</table>

<p class=MsoNormal style='line-height:200%'><span lang=EN-US style='font-family:
"Microsoft YaHei"'>     2</span><span style='font-family:"Microsoft YaHei"'>）创建目录及其父目录
</span></p>

<table class=a0 border=1 cellspacing=0 cellpadding=0 width="97%"
 style='width:97.0%;margin-left:24.1pt;border-collapse:collapse;border:none'>
 <tr style='height:14.9pt'>
  <td width=836 valign=top style='width:836.15pt;border:solid windowtext 1.0pt;
  background:#E7E6E6;padding:0cm 5.4pt 0cm 5.4pt;height:14.9pt'>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>[root@localhost
  weijie]# <b>mkdir -v test01/test           //</b></span></code><code><b><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>目录</span></b></code><code><b><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'>test01</span></b></code><code><b><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>不存在，无法在其下创建</span></b></code><code><b><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'>test</span></b></code><code><b><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>目录</span></b></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>mkdir: </span></code><code><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>无法创建目录</span></code><code><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'>&quot;test01/test&quot;:
  </span></code><code><span style='font-size:10.0pt;line-height:200%;
  font-family:DengXian'>没有那个文件或目录</span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>&nbsp;</span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>[root@localhost
  weijie]# <b>mkdir -p -v test01/test         //</b></span></code><code><b><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>使用选项</span></b></code><code><b><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'>-p</span></b></code><code><b><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>，当目录</span></b></code><code><b><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'>test01</span></b></code><code><b><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>不存在的时候，首先创建</span></b></code><code><b><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'>test01</span></b></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>mkdir: </span></code><code><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>已创建目录</span></code><code><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'>
  &quot;test01&quot;</span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>mkdir: </span></code><code><span
  style='font-size:10.0pt;line-height:200%;font-family:DengXian'>已创建目录</span></code><code><span
  lang=EN-US style='font-size:10.0pt;line-height:200%;font-family:Menlo'>
  &quot;test01/test&quot;</span></code></p>
  <p class=MsoNormal style='line-height:200%'><code><span lang=EN-US
  style='font-size:10.0pt;line-height:200%;font-family:Menlo'>You have new mail
  in /var/spool/mail/root</span></code></p>
  </td>
 </tr>
</table>

<p class=MsoNormal style='line-height:200%'><span lang=EN-US style='font-family:
"Microsoft YaHei"'>&nbsp;</span></p>

<p class=MsoNormal style='line-height:200%'><span lang=EN-US style='font-family:
"Microsoft YaHei"'>&nbsp;</span></p>

<p class=MsoNormal style='line-height:200%'><span lang=EN-US style='font-family:
"Microsoft YaHei"'>&nbsp;</span></p>

<p class=MsoNormal align=center style='text-align:center;line-height:200%'><span
lang=EN-US style='font-family:"Microsoft YaHei"'>Copyright@david 
zhytwj2018@163.com</span></p>

</div>

</body>

</html>
